package pl.edu.agh.jemo.conf.types;

import java.util.ArrayList;
import java.util.List;

import pl.edu.agh.jemo.evolution.specimen.Specimen;
import pl.edu.agh.jemo.evolution.specimen.impl.NSGA2Specimen;
import pl.edu.agh.jemo.evolution.specimen.impl.SPEA2Specimen;

/**
 * Class dedicated to list all available Specimen types.
 * It is used by user interface, in order to help user choosing a specimen type to be used by algorithm.
 * 
 * Note that some algorithms might filter list for some certain types of specimen
 * 
 * @author Marcin.Zbijowski
 *
 */
public class SpecimenTypesHandler {

	/**
	 * Returns collection of all available implemented specimen in jemo.
	 * Returned object is java.util.List, containing references to classes being extension of Specimen class.
	 * This method should be updated when adding new specimen implementation.
	 * 
	 * @return List of objects representing classes of available specimen
	 */
	public static List<PrintableType<? extends Specimen>> getSpecimenTypes() {
		List<PrintableType<? extends Specimen>> classes = new ArrayList<PrintableType<? extends Specimen>>();
		classes.add(new PrintableType<NSGA2Specimen>(NSGA2Specimen.class, "NSGA2 Specimen"));
		classes.add(new PrintableType<SPEA2Specimen>(SPEA2Specimen.class, "SPEA2 Specimen"));
		classes.add(new PrintableType<Specimen>(Specimen.class, "Specimen"));
		return classes;
	}

}
